home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmInfo
- BorderStyle = 1 'Fixed Single
- Caption = "VB/ISAM Sample Program SAM4 -- Dataset Info"
- ClientHeight = 3105
- ClientLeft = 1920
- ClientTop = 1785
- ClientWidth = 5820
- ControlBox = 0 'False
- Height = 3795
- Left = 1860
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3105
- ScaleWidth = 5820
- Top = 1155
- Width = 5940
- Begin SSPanel pnlWholeForm
- Align = 1 'Align Top
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelInner = 1 'Inset
- Font3D = 0 'None
- ForeColor = &H00FF0000&
- Height = 3105
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 5820
- Begin SSPanel pnlSpinner
- BackColor = &H00C0C0C0&
- BevelInner = 1 'Inset
- Font3D = 0 'None
- ForeColor = &H00FF0000&
- Height = 615
- Left = 4890
- TabIndex = 13
- Top = 1740
- Width = 495
- Begin SpinButton spnSpinButton
- BackColor = &H00C0C0C0&
- Delay = 75
- ForeColor = &H00000000&
- Height = 435
- Left = 90
- ShadowBackColor = &H00808080&
- ShadowForeColor = &H00FFFFFF&
- SpinForeColor = &H000000FF&
- TdThickness = 2
- Top = 90
- Width = 315
- End
- End
- Begin SSPanel pnlDoneButton
- BackColor = &H00C0C0C0&
- BevelInner = 1 'Inset
- Font3D = 0 'None
- ForeColor = &H00FF0000&
- Height = 975
- Left = 4020
- TabIndex = 10
- Top = 420
- Width = 1365
- Begin SSCommand cmdOK
- Caption = "OK"
- Font3D = 0 'None
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 795
- Left = 90
- Outline = 0 'False
- Picture = SAM4INFO.FRX:0000
- TabIndex = 6
- Top = 90
- Width = 1185
- End
- End
- Begin Label Label6
- BackStyle = 0 'Transparent
- Caption = "** % =integer; && =long; ! =single; # =double; @ =currency; $ = variable-length string; $*n = fixed-length string. X=index. Field 000 is the primary (""P"") index -- with UNIQUE keys."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 645
- Left = 480
- TabIndex = 14
- Top = 2190
- Width = 4305
- End
- Begin Label lblFieldInfo
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "123 [X$*123]"
- Height = 255
- Left = 480
- TabIndex = 12
- Top = 1890
- Width = 4215
- End
- Begin Label Label5
- BackStyle = 0 'Transparent
- Caption = "Field No. [Type**] Name"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Left = 480
- TabIndex = 11
- Top = 1650
- Width = 1875
- End
- Begin Label lblFreeFileNoteSpace
- BorderStyle = 1 'Fixed Single
- Height = 225
- Left = 2520
- TabIndex = 9
- Top = 1170
- Width = 1215
- End
- Begin Label lblGroupsUsed
- BorderStyle = 1 'Fixed Single
- Height = 225
- Left = 2520
- TabIndex = 8
- Top = 930
- Width = 1215
- End
- Begin Label lblGroupSize
- BorderStyle = 1 'Fixed Single
- Height = 225
- Left = 2520
- TabIndex = 7
- Top = 690
- Width = 1215
- End
- Begin Label lblRecordsInFile
- BorderStyle = 1 'Fixed Single
- Height = 225
- Left = 2520
- TabIndex = 5
- Top = 450
- Width = 1215
- End
- Begin Label Label4
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Free file note space (bytes):"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Left = 480
- TabIndex = 4
- Top = 1170
- Width = 1965
- End
- Begin Label Label3
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Number of groups used:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Left = 480
- TabIndex = 3
- Top = 930
- Width = 1965
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Group size (bytes):"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Left = 480
- TabIndex = 2
- Top = 690
- Width = 1965
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Number of records:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Left = 480
- TabIndex = 1
- Top = 450
- Width = 1965
- End
- End
- Begin Menu mnuMouseless
- Caption = "Mouseless operation"
- Begin Menu mnuSpinHigher
- Caption = "Spin to &higher field"
- End
- Begin Menu mnuSpinLower
- Caption = "Spin to &lower field"
- End
- End
- Option Explicit
- Sub cmdOK_Click ()
- Me.Hide
- End Sub
- Sub DisplayFieldInfo ()
- SchemaLine = DS_GetField(Schema, CRLFDelim, FieldNum + 1)
- ThisType = DS_GetField(SchemaLine, BarDelim, 2)
- If ThisType = "&" Then 'Windows gets weird with ampersands!
- lblFieldInfo.Caption = Format$(FieldNum, "000") & " [" & "&&" & "] " & DS_GetField(SchemaLine, BarDelim, 3)
- Else
- lblFieldInfo.Caption = Format$(FieldNum, "000") & " [" & ThisType & "] " & DS_GetField(SchemaLine, BarDelim, 3)
- End If
- lblFieldInfo.Refresh
- End Sub
- Sub Form_Activate ()
- rc = VMXInfo(DatasetRefNum, DatasetInfo) 'Refresh (record-count may have changed)
- If rc <> VIS_OK Then
- TellUser (INFO_ERROR)
- ExitProgram 'Panic exit
- End If
- lblRecordsInFile.Caption = " " & Format$(DatasetInfo.RecordsInFile, "###,###,##0")
- lblGroupSize.Caption = Str$(DatasetInfo.GroupSize)
- lblGroupsUsed.Caption = " " & Format$(DatasetInfo.GroupsUsed, "##,##0")
- lblFreeFileNoteSpace.Caption = " " & Format$(DatasetInfo.FreeFileNoteSpace, "#,##0")
- FieldNum = 0
- DisplayFieldInfo
- End Sub
- Sub mnuSpinHigher_Click ()
- spnSpinButton_SpinDown
- End Sub
- Sub mnuSpinLower_Click ()
- spnSpinButton_SpinUp
- End Sub
- Sub spnSpinButton_SpinDown ()
- If FieldNum < NumberOfFields Then
- FieldNum = FieldNum + 1
- DisplayFieldInfo
- End If
- End Sub
- Sub spnSpinButton_SpinUp ()
- If FieldNum > 0 Then
- FieldNum = FieldNum - 1
- DisplayFieldInfo
- End If
- End Sub
-